<!--#begin groupscreate -->


<form name="gcreatemod" method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="groups">
<input type="hidden" name="idx" value="List">
<input type="hidden" name="grpid" value="{ arr[id] }">
<input type="hidden" name="add" value="add">
<table  width="80%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground" align="center" valign="middle"> 
	<table class="BabLoginMenuBackground"  width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
	<!--#if arr[id] -->
	<!--#else arr[id] -->
	<tr>
		<td colspan="2"><h5 id="groupcreate_formtitle">{ t_create_group }</h5></td>
	</tr>
	<!--#endif arr[id] -->
	<tr> 
	<td align="right">{ t_name }:</td>
	<td> 
	<input type="text" name="name" size="20" maxlength="255" value="{ arr[name] }">
	</td>
	</tr>
	<tr> 
	<td align="right">{ description }:</td>
	<td> 
	<input type="text" name="description" size="45" maxlength="255" value="{ arr[description] }">
	</td>
	</tr>
	
	<tr> 
	<td align="right">{ t_parent }:</td>
	<td> 
	<!--#if maingroup -->
		{ t_ovidentia_users }
	<!--#else maingroup -->
	<select name="parent">
	<!--#in getnextgroup -->
	<option value="{ id }" <!--#if selected --> selected="selected" <!--#endif selected --> >{ name }</option>
	<!--#endin getnextgroup -->
	</select>
	<!--#endif maingroup -->
	</td>
	</tr>
	<tr> 
	<td>&nbsp;</td>
	<td> 
	<input type="submit" name="submit" value="{ t_record }">

	&nbsp;&nbsp;<input type="submit" name="deleteg" <!--#if bdel --> <!--#else bdel --> style="visibility:hidden"<!--#endif bdel --> value="{ t_delete }">

	<br>
	</td>
	</tr>
	</table>
</td>
</tr>
</table>
</form>
<br>

<!--#end groupscreate -->


<!--#begin memberslist -->
<!--#if bshowform -->
<script type="text/javascript">
	<!--
function ovidentia_hidegroupselect(select) {
		var selection = select.options.selectedIndex;
		switch(select.options[selection].value) {
			case '2':
				document.getElementById('groupselect').style.display = '';
				//document.getElementById('groupselect').disabled = false;
				break;
			case '3':
				document.getElementById('groupselect').style.display = '';
				break;
			default:
				document.getElementById('groupselect').style.display = 'none';
				break;
		}
	}
	
	// -->
</script>
<form method="post" action="{ babPhpSelf }" name="listform">
<input type="hidden" name="tg" value="group">
<input type="hidden" name="idx" value="Deletem">
<input type="hidden" name="item" value="{ grpid }">
<!--#endif bshowform -->
<table border="0" width="80%" cellpadding="2" cellspacing="0" align="center" class="BabLoginCadreBackground">
<tr> 
<td> 

	<table class="BabLoginCadreBackground" border="0" width="100%" cellpadding="2" cellspacing="0">
	<tr class="BabSiteAdminTitleFontBackground"> 
		
		<td width="30%">{ t_lastname }</td>
		<td>{ t_firstname }</td>
		<td width="2%">&nbsp;
		</td>
	</tr>
	<!--#in getnext -->
	<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
		
		<td> 
			<!--#if bmodname -->
			<a href="{ url }">{ arr[lastname] }</a>
			<!--#else bmodname -->
			{ arr[lastname] }
			<!--#endif bmodname -->
		</td>
		<td> 
			{ arr[firstname] }
		</td>
		<td align="center">
			<!--#if bshowform --><input type="checkbox" name="users[]" value="{ arr[id] }"><!--#endif bshowform --> 
		</td>
	</tr>
	<!--#endin getnext -->
	<tr class="BabSiteAdminTitleFontBackground"> 
		
		<td colspan="2">&nbsp;</td>
		<td width="2%" align="center">
		<!--#if bshowform -->
			<a href="javascript:onCheckAll('users', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" border="0" /></a><a href="javascript:onCheckAll('users', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" border="0" /></a>
		<!--#endif bshowform -->
		</td>
	</tr>
	</table>
</td></tr></table>
<br /><!--#if bshowform -->
<div align="center">{ withselected }:&nbsp;
<select name="wchoice" onchange="ovidentia_hidegroupselect(this);">
<option value="1" { w1selected }>{ deleteonly }</option>
<option value="2" { w2selected }>{ copytogroup }</option>
<option value="3" { w3selected }>{ movetogroup }</option>
</select>&nbsp;
<select name="id_group" id="groupselect">
<option value=""></option>
<!--#in getnextgroup -->
<option value="{ id }" { groupselected }>{ name }</option>
<!--#endin getnextgroup -->
</select>
<input type="submit" value="{ t_upgrade }" />
</div>
</form>
<script type="text/javascript">
	<!--
	
	/* Hide smtp functions when onload page */
	ovidentia_hidegroupselect(document.getElementById('groupselect'));
	
	// -->
</script>
<!--#endif bshowform -->
<!--#end memberslist -->


<!--#begin groupsoptions -->
<form method="post" action="{ babPhpSelf }" name="listform">
<input type="hidden" name="tg" value="groups">
<input type="hidden" name="idx" value="options">
<input type="hidden" name="update" value="options">
<table border="0" width="90%" cellpadding="2" cellspacing="0" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
<table class="BabMailBackground" border="0" width="100%" cellpadding="2" cellspacing="0">
<tr class="BabSiteAdminTitleFontBackground">
<td valign="middle">{ fullname } </td>
<!--#if bdgmail -->
<td valign="middle" align="center">{ mail } </td>
<!--#endif bdgmail -->
<!--#if bdgnotes -->
<td valign="middle" align="center">{ notes } </td>
<!--#endif bdgnotes -->
<!--#if bdgcontacts -->
<td valign="middle" align="center">{ contacts } </td>
<!--#endif bdgcontacts -->
<!--#if bpcalendar -->
<td valign="middle" align="center">{ pcalendar } </td>
<!--#endif bpcalendar -->
<!--#if bdgpds -->
<td valign="middle" align="center">{ persdiskspace } </td>
<!--#endif bdgpds -->
</tr>
<!--#in getnext -->
<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg --> 
<td valign="middle"> 
{ urlname } 
</td>
<!--#if bdgmail -->
<td valign="middle" width="0%" align="center"> 
<input type="checkbox" name="mailgrpids[]" { mailcheck } value="{ grpid }">
</td>
<!--#endif bdgmail -->
<!--#if bdgnotes -->
<td valign="middle" width="0%" align="center"> 
<input type="checkbox" name="notgrpids[]" { notescheck } value="{ grpid }">
</td>
<!--#endif bdgnotes -->
<!--#if bdgcontacts -->
<td valign="middle" width="0%" align="center"> 
<input type="checkbox" name="congrpids[]" { concheck } value="{ grpid }">
</td>
<!--#endif bdgcontacts -->
<!--#if bpcalendar -->
<td valign="middle" width="0%" align="center"> 
<input type="checkbox" name="pcalgrpids[]" { pcalcheck } value="{ grpid }">
</td>
<!--#endif bpcalendar -->
<!--#if bdgpds -->
<td valign="middle" width="0%" align="center"> 
<input type="checkbox" name="pdsgrpids[]" { pdscheck } value="{ grpid }">
</td>
<!--#endif bdgpds -->
</tr>        
<!--#endin getnext -->
<tr class="BabSiteAdminTitleFontBackground"> 
<td valign="middle">&nbsp;</td>
<!--#if bdgmail -->
<td width="1%" align="center"><a href="javascript:onCheckAll('mailgrpids', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" width="10" height="10" border="0"></a><a href="javascript:onCheckAll('mailgrpids', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" width="10" height="10" border="0"></a></td>
<!--#endif bdgmail -->
<!--#if bdgnotes -->
<td width="1%" align="center"><a href="javascript:onCheckAll('notgrpids', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" width="10" height="10" border="0"></a><a href="javascript:onCheckAll('notgrpids', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" width="10" height="10" border="0"></a></td>
<!--#endif bdgnotes -->
<!--#if bdgcontacts -->
<td width="1%" align="center"><a href="javascript:onCheckAll('congrpids', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" width="10" height="10" border="0"></a><a href="javascript:onCheckAll('congrpids', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" width="10" height="10" border="0"></a></td>
<!--#endif bdgcontacts -->
<!--#if bpcalendar -->
<td width="1%" align="center"><a href="javascript:onCheckAll('pcalgrpids', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" width="10" height="10" border="0"></a><a href="javascript:onCheckAll('pcalgrpids', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" width="10" height="10" border="0"></a></td>
<!--#endif bpcalendar -->
<!--#if bdgpds -->
<td width="1%" align="center"><a href="javascript:onCheckAll('pdsgrpids', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" width="10" height="10" border="0"></a><a href="javascript:onCheckAll('pdsgrpids', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" width="10" height="10" border="0"></a></td>
<!--#endif bdgpds -->
</tr>
</table>
</td>
</tr>
</table>
<br>
<div align="center">
<input type="submit" name="submit" value="{ modify }"></div>
<br>
</form>
<!--#end groupsoptions -->

<!--#begin browsegroups -->
<ul>
<!--#in getnext -->
	<li><a href="#" onclick="self.opener.{ cb }({ groupid }, '{ jgroupname }');return false;">{ groupname }</a> </li>
<!--#endin getnext -->
</ul>
<!--#end browsegroups -->



<!--#begin grp_maintree -->
<script type="text/javascript" src="{ babInstallPath }scripts/ul_tree.js"></script>

<div id="bab_groups_tree" class="bab_tree BabLoginCadreBackground" style="padding: 1px">
	<p class="BabSiteAdminTitleFontBackground">
		<a href="javascript:tree.expand();" class="expand">{ t_expand_all }</a> 
		<a href="javascript:tree.collapse();" class="collapse">{ t_collapse_all }</a>
			<!--#if bupdate -->
		<a href="{ babUrlScript }?tg=groups&amp;idx=Create" onclick="return load_clear();" class="newgroup">{ t_newgroup }</a>
			<!--#endif bupdate -->
	</p>
	
<div class="tree icon-left-16 icon-left icon-16x16" style="position: relative">
	<ul>
	<li id="bab_ovgroup_{ arr[id] }">
		<div class="line">
		<!--#if delegat -->
		<img src="{ babSkinPath }images/Puces/folder_group_d.gif" alt="{ t_group }" />
		<!--#else delegat -->
		<img src="{ babSkinPath }images/Puces/folder_group.gif" alt="{ t_group }" />
		<!--#endif delegat -->
		<!--#if indelegat -->
		{ arr[name] }
		<!--#else indelegat -->
		<a href="{ babUrlScript }?tg=groups&amp;idx=Create&amp;grpid={ arr[id] }" title="{ arr[description] }" onclick="return load_edit_form(this);">{ arr[name] }</a>
		<!--#endif indelegat -->
			
		<!--#if arr[id] "> 2" -->
		<span class="right_elements">
			<a href="{ babUrlScript }?tg=group&amp;idx=Members&amp;item={ arr[id] }" title="{ t_group_members }"><span class="icon { iconCssClass_Members }">{ t_members }</span></a>
		</span>
		<!--#endif arr[id] -->
		</div>
		{ tpl_tree }
		</li>
	</ul>
	<br />
	</div>
</div>

<script type="text/javascript">
var tree = new bab_ul_tree('bab_groups_tree');
tree.processList();
tree.expandToItem('bab_ovgroup_{ id_expand_to }');

function load_edit_form(a)
{
	var htmlid		 = a.parentNode.parentNode.id;
	var htmlparent	 = a.parentNode.parentNode.parentNode.parentNode.id;
	var tmp = htmlid.split('_');
	var groupid		 = parseInt(tmp[2]);
	tmp = htmlparent.split('_');
	var parent		 = parseInt(tmp[2]);
	var name		 = a.innerHTML;
	var description	 = a.title;

	if (typeof document.forms['gcreatemod'].elements == 'undefined')
	{
		return;
	}

	var el = document.forms['gcreatemod'].elements;

	el['grpid'].value		 = groupid;
	el['name'].value		 = name;
	el['description'].value	 = description;

	
	if (groupid > 3)
		{
		el['parent'].style.visibility = 'visible';
		el['parent'].value = parent;
		el['deleteg'].style.visibility = 'visible';
		}
	else if(3 == groupid)
		{
		el['parent'].style.visibility = 'visible';
		el['parent'].value = parent;
		el['deleteg'].style.visibility = 'hidden';
		}
	else
		{
		el['parent'].style.visibility = 'hidden';
		el['deleteg'].style.visibility = 'hidden';
		}

	document.getElementById('groupcreate_formtitle').innerHTML = '{ t_edit_group } : '+name;
	document.getElementById('groupcreate_formtitle').scrollIntoView(true);
	
	return false;
}


function load_clear()
{
	if (typeof document.forms['gcreatemod'].elements == 'undefined')
		return;

	var el = document.forms['gcreatemod'].elements;

	if( el['grpid'].value != '' )
	{
	el['parent'].value = el['grpid'].value;
	}
	else
	{
	el['parent'].value		 = 1;
	}
	el['grpid'].value		 = '';
	el['name'].value		 = '';
	el['description'].value	 = '';
	el['parent'].style.visibility = 'visible';
	el['deleteg'].style.visibility = 'visible';
	document.getElementById('groupcreate_formtitle').innerHTML = '{ t_create_group }';
	document.getElementById('groupcreate_formtitle').scrollIntoView(true);
	
	return false;
}

</script>


<br />
<br />
<!--#end grp_maintree -->

<!--#begin grp_childs -->
	<ul class="icon-left-16 icon-left icon-16x16">
		<!--#in getnextgroup -->
		<li id="bab_ovgroup_{ arr[id] }">
			<div>
			<!--#if delegat -->
				<!--#if set -->
				<img src="{ babSkinPath }images/Puces/folder_group_set_d.gif" alt="{ t_group_set_d }" />
				<!--#else set -->
				<img src="{ babSkinPath }images/Puces/folder_group_d.gif" alt="{ t_group_d }" />
				<!--#endif set -->
			<!--#else delegat -->
				<!--#if set -->
				<img src="{ babSkinPath }images/Puces/folder_group_set.gif" alt="{ t_group_set }" />
				<!--#else set -->
				<img src="{ babSkinPath }images/Puces/folder_group.gif" alt="{ t_group }" />
				<!--#endif set -->
			<!--#endif delegat -->
		<!--#if bupdate -->
			<a href="{ babUrlScript }?tg=groups&amp;idx=Create&amp;grpid={ arr[id] }" title="{ arr[description] }" onclick="return load_edit_form(this);">{ arr[name] }</a>
		<!--#else bupdate -->
		{ arr[name] }
		<!--#endif bupdate -->
			
			<!--#if arr[id] "> 2" -->
			<span class="right_elements">
				<a href="{ babUrlScript }?tg=group&amp;idx=Members&amp;item={ arr[id] }" title="{ t_group_members }"><span class="icon { iconCssClass_Members }">{ t_members }</span></a>
			</span>
			<!--#endif arr[id] -->
			</div>
			{ subtree }
		</li>
		<!--#endin getnextgroup -->
	</ul>
<!--#end grp_childs -->


<!--#begin moveGroup -->


<form name="gcreatemod" method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="groups" />
<input type="hidden" name="idx" value="List" />
<input type="hidden" name="grpid" value="{ arr[grpid] }" />
<input type="hidden" name="name" value="{ arr[name] }" />
<input type="hidden" name="description" value="{ arr[description] }" />
<input type="hidden" name="parent" value="{ arr[parent] }" />

<input type="hidden" name="add" value="add">
<table  width="80%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground" align="center" valign="middle"> 
	<table class="BabLoginMenuBackground"  width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
	<tr> 
		<td align="right" width="50%">{ t_name } :</td>
		<td> 
		{ arr[name] }
		</td>
	</tr>
	<tr> 
		<td align="center" colspan="2">
		<select name="moveoption">
			<option value="1">{ t_move_group }</option>
			<option value="2">{ t_move_group_childs }</option>
		</select>
		
		</td>
	</tr>

	<tr> 
		<td align="center" colspan="2">
		<br />
		<input type="submit" value="{ t_record }" />
		</td>
	</tr>
	
	</table>
</td>
</tr>
</table>
</form>
<!--#end moveGroup -->

<!--#begin confirmdeletegroup -->
<form method="post" action="{ babPhpSelf }" name="listform">
<input type="hidden" name="tg" value="group" />
<input type="hidden" name="idx" value="DeleteGrroup" />
<input type="hidden" name="idgroup" value="{ idgroup }" />
<input type="hidden" name="action" value="DeleteG" />
<table border="0" width="55%" cellpadding="2" cellspacing="0" align="center" class="BabLoginCadreBackground">
<tr>
<td> 
	<table class="BabLoginMenuBackground" border="0" width="100%" cellpadding="6" cellspacing="0">
	<tr>
		<td align="center">
			<p><strong>{ title }</strong></p>
			<p><font color="red"><strong>{ warning }</strong></font></p>
			<p><strong>{ message }</strong></p>
			<p>
			<select name="dgwhat">
				<option value="0">{ t_deletethisgroup }</option>
				<option value="1">{ t_deletegroupwithchilds }</option>
				<option value="2">{ t_deleteonlychilds }</option>
				<option value="3">{ t_deleteonlyfirstchilds }</option>
			</select>
			</p>
			<p>
			<input type="submit" name="byes" value="{ t_yes }" />&nbsp;&nbsp;<input type="submit" name="bno" value="{ t_no }" />
			</p>
		</td>
	</tr>
	</table>
</td>
</tr>
</table>
</form>
<!--#end confirmdeletegroup -->
